﻿<%@ Page Title="Quản Lý Chương Trình" Language="C#" MasterPageFile="~/admin/admin.master" AutoEventWireup="true" CodeFile="quanlichuongtrinh.aspx.cs" Inherits="quanlichuongtrinh" %>

<%@ Register assembly="DevExpress.Web.ASPxGridView.v9.1, Version=9.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dxwgv" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v9.1, Version=9.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>

<%@ Register assembly="DevExpress.Web.ASPxHtmlEditor.v9.1, Version=9.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxHtmlEditor" tagprefix="dxhe" %>
<%@ Register assembly="DevExpress.Web.ASPxSpellChecker.v9.1, Version=9.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxSpellChecker" tagprefix="dxwsc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style6
        {
            width: 51px;
        }
        .style7
        {}
        .style8
        {
            width: 51px;
            height: 51px;
        }
        .style9
        {
            height: 51px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="alert alert-success" style="text-align: center;font-size: 17px;">Thêm Chương Trình</div>
    <div class="form-horizontal">
        <div class="control-group">
            <asp:Label ID="Label1" CssClass="control-label" runat="server" Text="Chọn ảnh"></asp:Label>
            <div class="controls">
                <asp:FileUpload ID="FileUpload1" runat="server" />
            </div>
        </div>
        <div class="control-group">
            <asp:Label ID="Label2" CssClass="control-label" runat="server" Text="Tên Chương trình"></asp:Label>
            <div class="controls">
                <asp:TextBox ID="txt_TenCt" runat="server"></asp:TextBox>
            </div>
        </div>
        
        <div class="control-group">
            <asp:Label ID="Label3" CssClass="control-label" runat="server" Text="Lọai Chương trình"></asp:Label>
            <div class="controls">
                <asp:DropDownList ID="DropDownList1" runat="server">
                </asp:DropDownList>
            </div>
        </div>
        
        <div class="control-group">
            <asp:Label ID="Label4" CssClass="control-label" runat="server" Text="Thời lượng"></asp:Label>
            <div class="controls">
                <dxe:ASPxSpinEdit ID="txt_ThoiLuong" runat="server" Height="21px" Number="0">
                </dxe:ASPxSpinEdit>
            </div>
        </div>
        <div class="control-group">
            <asp:Label ID="Label5" CssClass="control-label" runat="server" Text="Mô tả"></asp:Label>
            <div class="controls">
                <asp:TextBox ID="txt_Mota" runat="server" Rows="3" TextMode="MultiLine"></asp:TextBox>
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <asp:Button ID="Button1" runat="server" Text="Submit" onclick="Button1_Click" />
            </div>
        </div>
    </div>

    <dxwgv:ASPxGridView CssClass="table table-hover" ID="gv_qlChuongTrinh" runat="server" 
        ClientInstanceName="grid"
        EnableRowsCache="False" 
        AutoGenerateColumns="False" KeyFieldName="ct.mact" 
        onrowdeleting="gv_qlChuongTrinh_RowDeleting" 
        onrowupdating="gv_qlChuongTrinh_RowUpdating">
        <Columns>
            <dxwgv:GridViewCommandColumn ShowInCustomizationForm="True" VisibleIndex="0" Caption="Action">
                <EditButton Visible="True" Text="Sửa">
                </EditButton>
                <DeleteButton Visible="True" Text="Xóa">
                </DeleteButton>
            </dxwgv:GridViewCommandColumn>
            <dxwgv:GridViewDataTextColumn Caption="Ảnh" 
                VisibleIndex="1">
                <DataItemTemplate>
                    <dxe:ASPxImage ID="ASPxImage1" runat="server" CssClass="img-polaroid" 
                        Height="70px" ImageUrl='<%#Eval("ct.hinhanh","../images_chuongtrinh/{0}") %>'>
                    </dxe:ASPxImage>
                </DataItemTemplate>
            </dxwgv:GridViewDataTextColumn>
<dxwgv:GridViewDataTextColumn ShowInCustomizationForm="True" Caption="Tên Chương Trình" 
                VisibleIndex="2" FieldName="ct.tenct">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn Caption="Loại Chương Trình" FieldName="tenLoaiCt" 
                VisibleIndex="3">
            </dxwgv:GridViewDataTextColumn>
<dxwgv:GridViewDataTextColumn FieldName="ct.thoiluong" ShowInCustomizationForm="True" 
                Caption="Thời Lượng" VisibleIndex="4">
    <PropertiesTextEdit>
        <Style HorizontalAlign="Center" VerticalAlign="Middle">
        </Style>
    </PropertiesTextEdit>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn Caption="Mô tả" FieldName="ct.mota" 
                VisibleIndex="5">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataHyperLinkColumn Caption="More" FieldName="ct.mact" 
                VisibleIndex="6">
                <DataItemTemplate>
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("ct.mact","quanlilichdien.aspx?id={0}") %>'>Ql Lịch Diễn</asp:HyperLink>
                </DataItemTemplate>
            </dxwgv:GridViewDataHyperLinkColumn>
        </Columns>
        <SettingsEditing Mode="PopupEditForm" />
        <SettingsText CommandCancel="Hủy" CommandDelete="Xóa" CommandEdit="Sửa" 
            CommandNew="Thêm" CommandUpdate="Lưu" />
        <Templates>
            <EditForm>
                <table style="width: 93%;">
                    <tr>
                        <td class="style6">
                            Tên Chương Trình</td>
                        <td class="style7" colspan="3">
                           
                            <dxe:ASPxTextBox ID="ASPxTextBox1" runat="server" Height="16px" 
                                Text='<%# Eval("ct.tenct") %>' Width="588px">
                            </dxe:ASPxTextBox>
                             <dxe:ASPxLabel ID="ASPxLabel1" runat="server" Text='<%# Eval("ct.mact") %>' 
                                Height="16px" Visible="False" Width="78px">
                            </dxe:ASPxLabel>
                        </td>
                    </tr>
                    <tr>
                        <td class="style8">
                            Ảnh</td>
                        <td class="style9">
                            
                            
                            <asp:FileUpload ID="FU_taihinh" runat="server" />
                            <dxe:ASPxImage ID="ASPxImage2" runat="server" Height="73px" 
                                ImageUrl='<%# Eval("ct.hinhanh","../images_chuongtrinh/{0}") %>' Width="81px">
                            </dxe:ASPxImage>
                            <dxe:ASPxLabel ID="ASPxLabel2" runat="server" Height="16px" 
                                Text='<%# Eval("ct.hinhanh") %>' Visible="False" Width="21px">
                            </dxe:ASPxLabel>
                        </td>
                        <td class="style9">
                            Thời Lượng</td>
                        <td class="style9" width="100">
                            <dxe:ASPxTextBox ID="ASPxTextBox3" runat="server" 
                                Text='<%# Eval("ct.thoiluong") %>' Width="170px">
                            </dxe:ASPxTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style6">
                            Mô Tả</td>
                        <td colspan="3">
                            <dxe:ASPxTextBox ID="ASPxTextBox4" runat="server" Height="16px" 
                                Text='<%# Eval("ct.mota") %>' Width="593px">
                            </dxe:ASPxTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style6">
                            &nbsp;</td>
                        <td colspan="3">
                         <dxwgv:ASPxGridViewTemplateReplacement  ID="ASPxGridViewTemplateReplacement1"
                                runat="server" ReplacementType="EditFormUpdateButton">
                            </dxwgv:ASPxGridViewTemplateReplacement>
                            <dxwgv:ASPxGridViewTemplateReplacement ID="ASPxGridViewTemplateReplacement2" 
                                runat="server" ReplacementType="EditFormCancelButton">
                            </dxwgv:ASPxGridViewTemplateReplacement>
                        </td>
                    </tr>
                </table>
            </EditForm>
        </Templates>
    </dxwgv:ASPxGridView>

</asp:Content>

